#ifndef __TRIE_H_
#define __TRIE_H_

#include <sys/types.h>
#include <sys/tree.h>

#include <err.h>
#include <errno.h>
#include <stdarg.h>
#include <unistd.h>

#include <tcl.h>

enum TrieType {
   INVALID = -1,
   STRING = 0,
   INTEGER,
   FLOAT,
};

struct _trie {
   RB_ENTRY(_trie) entry;
   Tcl_Obj *value;
   enum TrieType type;
}

struct _tcltrie {
   Tcl_Interp *interp;
   RB_HEAD(_trieobj, _trie) triehead;
   int count;
};

struct _tcltrie *trie;

#endif
